From: Alessandro Bono Date: Mon, 8 Aug 2022 11:33:53 +0000 (+0200) Subject: loginDialog: Don't call _loginScreenSessionActivated() when not required X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~461^2^2~109 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4871eba8bf51eed1c31b875a81f9d814d7705ac8;p=gnome-shell.git loginDialog: Don't call _loginScreenSessionActivated() when not required We are calling _loginScreenSessionActivated() even in cases where this is not required. For example, there are cases where the Active property is already `true` and properties like `IdleHint`, `IdleSinceHint` and `IdleSinceHintMonotonic` change. In this cases _loginScreenSessionActivated() is called and will reset the authPrompt when not necessary. Part-of: --- diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js index bd1a6591a..607193677 100644 --- a/js/gdm/loginDialog.js +++ b/js/gdm/loginDialog.js @@ -985,8 +985,9 @@ var LoginDialog = GObject.registerClass({ async _getGreeterSessionProxy() { const loginManager = LoginManager.getLoginManager(); this._greeterSessionProxy = await loginManager.getCurrentSessionProxy(); - this._greeterSessionProxy?.connectObject('g-properties-changed', () => { - if (this._greeterSessionProxy.Active) + this._greeterSessionProxy?.connectObject('g-properties-changed', (proxy, properties) => { + const activeChanged = !!properties.lookup_value('Active', null); + if (activeChanged && proxy.Active) this._loginScreenSessionActivated(); }, this); }